<html>
<head>
<script>
  // Called when the user clicks on the browser action.
  chrome.browserAction.onClicked.addListener(function(tab) {
    chrome.tabs.executeScript(
        null, {code:"document.body.style.background='red !important'"});
  });

  chrome.browserAction.setBadgeBackgroundColor({color:[0, 200, 0, 100]});

  var i = 0;
  window.setInterval(function() {
    chrome.browserAction.setBadgeText({text:String(i)});
    i++;
  }, 10);
</script>
</head>
</html>